#include "../include/threadPool.h"
#include "../include/workerArr.h"
#include "../include/head.h"

int threadPoolInit(threadPool_t *pthreadPool,int workernum)      
{ 

      workerArrInit(workernum,&pthreadPool->workerArr); 
      taskQueueInit(&pthreadPool->taskQueue);
      pthread_mutex_init(&pthreadPool->mutex,NULL);
      pthread_cond_init(&pthreadPool->cond,NULL);                            
      pthreadPool->exitFlag = 0;
      return 0;
 }



    


